﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PMSSys
{
    public partial class BoneMarrowList : Form
    {
        public BoneMarrowList(patientController ppcontroller, Patient pObject)
        {
            InitializeComponent();
            bmController = new bmaController();
            bmController.DbConnect = ppcontroller.DbConnect;
            this.pObject = pObject;
            DataTable lst = bmController.getBMADataTable(pObject.PatientID);
            dataGridView1.DataSource = lst;
            dataGridView1.Columns[0].Visible = false;
        }
        private bmaController bmController;
        private Patient pObject;

        private void button2_Click(object sender, EventArgs e)
        {
            BoneMarrowReadingView newWindow = new BoneMarrowReadingView();
            newWindow.ShowDialog();
        }

        private void openBMReadingFileButton_Click(object sender, EventArgs e)
        {
            BoneMarrowReadingView newWindow = new BoneMarrowReadingView();
            newWindow.ShowDialog();
        }

        private void removeMarkerButton_Click(object sender, EventArgs e)
        {
            //logic for removing entries from list goes here
        }

        private void button6_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void BoneMarrowList_Load(object sender, EventArgs e)
        {
            ToolTip t1 = uiUtility.tooltips();
            t1.SetToolTip(this.newBMReadingButton, "New Bone Marrow Reading");
            t1.SetToolTip(this.openBMReadingFileButton, "Open Bone Marrow Reading");
            t1.SetToolTip(this.removeMarkerButton, "Remove Bone Marrow Reading");
            t1.SetToolTip(this.button6, "Back");
        }
    }
}
